1. Field of the Invention
The present invention relates to a color matching method, a color matching device, a color matching program, and a computer readable record medium that stores the color matching program, and more specifically, to a color matching method, a color matching device, a color matching program, and a computer readable record medium that stores the color matching program, which are used for converting digital image data reproducible by a device such as a CRT (cathode ray tube) into image data reproducible by an output device such as a printer.
2. Description of the Background Art
In general, the color reproducible range of a CRT or a scanner is different from the color reproducible range of a printer. Thus, where the color reproduction ranges (Gamut) of two devices differ, matching of colors, i.e. color matching, is required between the two devices when an image reproduced by one device is to be reproduced by the other device. A general color matching method of the conventional art will be described briefly below.
In FIG. 14, the flow of image data is shown for the description of a color matching method between an input device 1401 and an output device 1407. Here, the image data reproduced by input device 1401 such as a CRT or a scanner is RGB data represented in the RGB color space, whereas the image data reproduced by output device 1407 such as a printer is CMYK data represented in the CMY color space. As shown in FIG. 14, the RGB data is ultimately converted into the CMYK data via various conversion processes in a color conversion processing portion 1403.
First, the RGB data in input device 1401 is input to color conversion processing portion 1403 and is converted into data of a color space independent of the device. The color space independent of the device is, for instance, the L*a*b* space, the XYZ space, and the like. Here, it is assumed that the conversion is made into data (L*a*b* data) represented in the L*a*b* space. A conversion using an LUT (Look Up Table) or a masking technique is employed for the conversion processing.
Then, the converted L*a*b* data is further converted in a Gamut mapping portion 1405 into the L*a*b* data of a range reproducible by output device 1407. Thus, it is in this Gamut mapping portion 1405 that the color matching between input device 1401 and output device 1407 is performed.
The data after color matching is also data of a color space independent of the device (L*a*b* data) so that it is again converted into CMYK data. Here also, a conversion using an LUT or a masking technique is employed for the conversion processing.
In this manner, the image data reproduced by input device 1401 is first converted into data of a color space independent of the device, and then, color matching is performed so as to allow the data to be reproduced by output device 1407.
FIG. 15 is a flow chart representing the flow of a conventional color conversion processing in color conversion processing portion 1403 shown in FIG. 14. As shown in FIG. 15, first, the profile of the color space reproducible by input device 1401 (hereinafter referred to as an “input color space”) and the profile of the color space reproducible by output device 1407 hereinafter referred to as an “output color space”) are respectively obtained (step S1501).
Then, a pixel value (image data) of an input image to be the target of data conversion is obtained (“yes” at step S1503). Then, the image data dependent on the color space of input device 1401 is converted into image data represented in the absolute color space (step S1505). Specifically, the input image data represented in the RGB space is converted into image data represented in the L*a*b* space, the XYZ space, or the like which is the absolute color space independent of a device.
Thereafter, color space compression processing (color matching processing) is performed on the converted absolute color space (step S1507). In other words, here, various conversion processes are performed for converting the image data in the input color space into the image data within the output color space. Specifically, the processes include correction of white point, conversion of lightness (compression/expansion in the direction of lightness), conversion of chroma (compression/expansion in the direction of chroma), correction of hue, and the like. A conversion parameter used in each conversion (or correction) processing is a fixed value derived empirically.
When the various conversion processes in the absolute color space are completed, the image data represented in the absolute color space, in turn, is converted into image data dependent on the color space of output device 1407 (step S1509), and output image data after conversion is obtained in a desired format (step S1511).
Above is a general outline of a common and conventional color matching processing. In this manner, a conversion parameter for performing the color conversion is fixed in advance in the conventional color matching method.
In addition to the above, for instance, a method is proposed in which color conversion tables are created in advance according to the degree of color space compression and the color conversion tables are switched appropriately. Even this method, however, has a fixed conversion parameter for performing the color space compression and the like, and does not change the conversion parameter for performing the color conversion according to the characteristics of the input color space and the output color space.
On the other hand, a color matching method in which a conversion parameter in the color conversion is changed has been conventionally proposed. For instance, such method involves calculating, for each color within the input color space, a conversion parameter while observing the shape of the output color space, and performing a color space compression processing based on the calculated conversion parameter. In such a method, there is a need to refer to many colors within the output color space so that a long period of time is required for the computation.
Thus, from the viewpoint of reduction of the processing time, a technique is proposed in which the conversion parameter is to be calculated on a separate mainframe computer. Specifically, the technique involves calculating the conversion parameter at a high speed, creating a table that allows direct conversion from the input color space into the output color space using the calculated conversion parameter, and performing the color conversion by utilizing this table. FIG. 16 is a flow chart representing the flow of processing when color matching is performed using such a method.
Referring to FIG. 16, when the respective profiles of the input color space and the output color space are obtained (step S1601), an output color corresponding to each color in the input color space is calculated using the conversion parameter calculated by the separate mainframe computer (step S1603). Then, using the result of calculation, a color conversion table for converting the input color space into the output color space is created (step S1605).
When a pixel value (image data) of the input image is obtained (“yes” in step S1607), using the created color conversion table, the image data within the input color space is directly converted into the image data within the output color space (step S1609). Then, the image data of the output image is obtained (step S1611).
In this manner, the color conversion processing is performed using the conversion parameter that is set by referring to the input color space and the output color space, it becomes possible to perform an appropriate conversion that takes into account the respective color space characteristics.
The conventional color matching method described above involved the following problems. In the conventional technique that utilizes a fixed value for a conversion parameter used in the color conversion processing, while the conversion processing is performed at a high speed, an appropriate and precise color conversion that takes into account the characteristics of the input color space and the characteristics of the output color space cannot be performed.
On the other hand, in the conventional technique in which the conversion parameter used in the color conversion processing is changed, the conversion parameter is calculated by taking into account the input color space and the output color space so that a precise color conversion is made possible. Yet, this technique caused the problem of complex processing and longer computation time being required.
In this manner, in the conventional color matching method, the improvement in the precision of color matching led to lower processing speed, while higher processing speed resulted in lower precision of matching. Thus, it was difficult to achieve both effects of improved precision and higher processing speed.